package com.city.repository.pub;

import com.city.domain.pub.PubFiletype;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @deprecation: 上传文件类型
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
public interface PubFiletypeRepository extends JpaRepository<PubFiletype,Integer> {

    @Query(value = "select * from pub_filetype where type=?1", nativeQuery = true)
    PubFiletype getFileTypeByName(String name);


    @Query(value = "SELECT * FROM pub_filetype WHERE type = ?1",nativeQuery = true)
    PubFiletype findByExt(String ext);
}
